﻿using GalaSoft.MvvmLight;
using Glorysoft.Auto.Xfw;
using Glorysoft.EAP.EAPClient.Model;
using Serilog.Core;
using System;
using System.Collections.ObjectModel;

namespace Glorysoft.EAP.EAPClient.ViewModel
{
    public class GlobalData : ViewModelBase
    {
        public GlobalData()
        {

        }
        private readonly Logger ServiceLogger = XfwContext.EapLogger;
        private static readonly Lazy<GlobalData> Lazy = new Lazy<GlobalData>(() => new GlobalData());
        public static GlobalData Current
        {
            get
            {
                return Lazy.Value;
            }
        }
        private string _EqpName;
        public string EqpName
        {
            get { return _EqpName; }
            set
            {
                _EqpName = value;
                RaisePropertyChanged("EqpName");
            }
        }
        /// <summary>
        /// 实时消息提示
        /// </summary>
        private ObservableCollection<InstantMsg> msg = new ObservableCollection<InstantMsg>();
        public ObservableCollection<InstantMsg> MSG
        {
            get { return msg; }
            set
            {
                msg = value;
                RaisePropertyChanged("MSG");
            }
        }
    }
}